<?php
/**
* @author: Truong Kim Phung
* @date: Monday, January 27, 2014
*/
$strUrlBack = isset($_SESSION[SESSION_BACKURL]) ? $_SESSION[SESSION_BACKURL] : HOST_BACKEND;
if( !isset($AppUI) || 
	//(isset($AppUI->id) && !in_array($AppUI->type, array(ROLE_ROOT, ROLE_ADMINISTRATOR)))
    !isset($_GET['clubid'])||
    !isset($_GET['sponsorid'])
) {
	redirect($strUrlBack);
}
$intClubId    = intval($_GET['clubid']);
$intSponsorId = intval($_GET['sponsorid']);
$row   = $this->sponsor->get($intSponsorId);
if($row == null) {
    	redirect($strUrlBack);
}
$this->smarty->assign('intClubId', $intClubId);
$this->smarty->assign('row', $row);
$this->smarty->assign('back', $strUrlBack);
$this->smarty->display('sponsor/edit.tpl');